import Vue from 'vue'
import Vuex from 'vuex'
//2.将 Vuex 安装为 Vue 的插件
Vue.use(Vuex)
// 3.创建 Store 的实例对象
const store = new Vuex.Store({
	// 挂载 store 模块
	modules: {},
	state: () => ({
		lat: "",
		lon: "",
		token:"123",
	}),
	actions: {
		
	},
	mutations: {
		userLat(state, payload) {
			state.lat = payload
		},
		userLon(state, payload) {
			state.lon = payload
		},
		seTtoken(state, payload) {
			state.token = payload
		},
	}
})
// 4.向外共享 Store 的实例对象
export default store